package cn.itsource.pethome.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

@Data
@ToString //相当于重写toString方法
@AllArgsConstructor //相当于全参构造器
@NoArgsConstructor //相当于无参构造器
@Table(name = "t_employee")
@ApiModel(description = "部门表对应实体类")
public class Employee extends BaseDomain{


    @ApiModelProperty(value = "员工姓名")
    private String username;
    @ApiModelProperty(value = "邮箱")
    private String email;
    @ApiModelProperty(value = "手机号")
    private String phone;
    @ApiModelProperty(value = "密码")
    @Column(name="password")
    private String passWord;
    @ApiModelProperty(value = "上级部门")
    @Column(name="age")
    private Long age;
    @ApiModelProperty(value = "状态(0表示正常,1表示禁用)")
    private Integer state;
    @ApiModelProperty(value = "门店ID，关联t_shop表的主键ID")
    //上级部门名称
    @Column(name="shop_id")
    private Long shopId;
    @ApiModelProperty(value = "部门ID，关联t_department表的主键ID")
    //上级部门名称
    @Column(name="dep_id")
    private Long depId;
    @ApiModelProperty(value = "门店名称")
    //上级部门名称
    @Transient
    private String shopName;
    @ApiModelProperty(value = "上级部门名称")
    //上级部门名称
    @Transient
    private String deptName;
}
